unit uDMReport;

interface

uses
  SysUtils, Classes, FMTBcd, DBClient, Provider, DB, SqlExpr, ppComm, ppRelatv,
  ppDBPipe, ppDB;

type
  TDMReport = class(TDataModule)
    sdsFolder: TSQLDataSet;
    sdsItem: TSQLDataSet;
    sdsTable: TSQLDataSet;
    sdsField: TSQLDataSet;
    dspFolder: TDataSetProvider;
    dspItem: TDataSetProvider;
    dspTable: TDataSetProvider;
    dspField: TDataSetProvider;
    cdsFolder: TClientDataSet;
    cdsItem: TClientDataSet;
    cdsTable: TClientDataSet;
    cdsField: TClientDataSet;
    dsFolder: TDataSource;
    dsItem: TDataSource;
    dsTable: TDataSource;
    dsField: TDataSource;
    sdsFolderFOLDERID: TIntegerField;
    sdsFolderNAME: TStringField;
    sdsFolderPARENTID: TIntegerField;
    sdsItemITEMID: TIntegerField;
    sdsItemFOLDERID: TIntegerField;
    sdsItemNAME: TStringField;
    sdsItemSIZE: TIntegerField;
    sdsItemITEMTYPE: TIntegerField;
    sdsItemMODIFIED: TStringField;
    sdsItemDELETED: TStringField;
    sdsItemTEMPLATE: TBlobField;
    cdsTableTABLENAME: TStringField;
    cdsTableTABLEALIAS: TStringField;
    cdsFieldTABLENAME: TStringField;
    cdsFieldFIELDNAME: TStringField;
    cdsFieldFIELDALIAS: TStringField;
    cdsFieldSELECTABLE: TStringField;
    cdsFieldSEARCHABLE: TStringField;
    cdsFieldSORTABLE: TStringField;
    cdsItemITEMID: TIntegerField;
    cdsItemFOLDERID: TIntegerField;
    cdsItemNAME: TStringField;
    cdsItemSIZE: TIntegerField;
    cdsItemITEMTYPE: TIntegerField;
    cdsItemMODIFIED: TStringField;
    cdsItemDELETED: TStringField;
    cdsItemTEMPLATE: TBlobField;
    ppDBPipelineFolder: TppDBPipeline;
    ppDBPipelineItem: TppDBPipeline;
    ppDBPipelineTable: TppDBPipeline;
    ppDBPipelineField: TppDBPipeline;
    cdsFolderFOLDERID: TIntegerField;
    cdsFolderNAME: TStringField;
    cdsFolderPARENTID: TIntegerField;
    cdsFieldAUTOSEARCH: TStringField;
    cdsFieldDATATYPE: TStringField;
    cdsFieldMANDATORY: TStringField;
    sdsJoin: TSQLDataSet;
    dspJoin: TDataSetProvider;
    cdsJoin: TClientDataSet;
    dsJoin: TDataSource;
    ppDBPipelineJoin: TppDBPipeline;
    cdsJoinTABLE_NAME1: TStringField;
    cdsJoinTABLE_NAME2: TStringField;
    cdsJoinJOIN_TYPE: TStringField;
    cdsJoinFIELD_NAMES1: TStringField;
    cdsJoinOPERATORS: TStringField;
    cdsJoinFIELD_NAMES2: TStringField;
    procedure cdsFolderAfterDelete(DataSet: TDataSet);
    procedure cdsFolderAfterPost(DataSet: TDataSet);
    procedure cdsItemAfterDelete(DataSet: TDataSet);
    procedure cdsItemAfterPost(DataSet: TDataSet);
    procedure cdsTableAfterDelete(DataSet: TDataSet);
    procedure cdsTableAfterPost(DataSet: TDataSet);
    procedure cdsFieldAfterDelete(DataSet: TDataSet);
    procedure cdsFieldAfterPost(DataSet: TDataSet);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  DMReport: TDMReport;

implementation

uses uDM1;

{$R *.dfm}

procedure TDMReport.cdsFieldAfterDelete(DataSet: TDataSet);
begin
  cdsField.ApplyUpdates(0);

end;

procedure TDMReport.cdsFieldAfterPost(DataSet: TDataSet);
begin
  cdsField.ApplyUpdates(0);
end;

procedure TDMReport.cdsFolderAfterDelete(DataSet: TDataSet);
begin
  cdsFolder.ApplyUpdates(0);
  cdsFolder.Refresh;
end;

procedure TDMReport.cdsFolderAfterPost(DataSet: TDataSet);
begin
  cdsFolder.ApplyUpdates(0);
  cdsFolder.Refresh;
end;

procedure TDMReport.cdsItemAfterDelete(DataSet: TDataSet);
begin
  cdsItem.ApplyUpdates(0);
  cdsItem.Refresh;
end;

procedure TDMReport.cdsItemAfterPost(DataSet: TDataSet);
begin
  cdsItem.ApplyUpdates(0);
  cdsItem.Refresh;
end;

procedure TDMReport.cdsTableAfterDelete(DataSet: TDataSet);
begin
  cdsTable.ApplyUpdates(0);

end;

procedure TDMReport.cdsTableAfterPost(DataSet: TDataSet);
begin
  cdsTable.ApplyUpdates(0);

end;

end.
